/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package basics.loops;

/**
 *
 * @author peng
 */
public class Loop {
    
    public static void main(String args[])
    {
        int n=5;//Declares a variable n, and assigns a value 5 to it.
        
        System.out.println("Here begins the for loop.");
        for(int i=0; i<n; i++)
        {
            System.out.println("Loop: " + i);
        }
        
        System.out.println("Here begins the while loop.");
        int i=0;
        while(i<n)
        {
            System.out.println("Loop: " + i);
            i++;
        }
    }
    
}
